package com.kuangstudy.oop.demo3;

/**
 * ClassName: Person
 * date: 2021/07/11 22:59:58
 *
 * @author zlk
 */
public class Person {
    /*2 赋初值*/
    {
        System.out.println("匿名代码块");
    }
    /*1 只执行一次*/
    static {
        System.out.println("静态代码块");
    }

    /*3*/
    public Person() {
        System.out.println("构造函数");
    }

    public static void main(String[] args) {
        Person person = new Person();
        new Person();
    }
}
